package com.mikufufu.blog.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;

/**
 * 存储桶表
 * 
 */
@Data
@TableName(value = "blog_storage")
public class Storage implements Serializable {

    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value = "存储桶主键")
    private Integer id;

    /**
     * 对象存储服务商（目前支持阿里云、minio和本地）
     */
    @TableField(value = "storage_code")
    @ApiModelProperty(value = "对象存储服务商（目前支持阿里云、minio和本地）")
    private String storageCode;

    @TableField(value = "storage_type")
    @ApiModelProperty(value = "对象存储服务的类型（1.minio，2.oss，3.local）")
    private Integer storageType;

    /**
     * 对象存储服务商名称
     */
    @TableField(value = "storage_name")
    @ApiModelProperty(value = "对象存储服务商名称")
    private String storageName;

    /**
     * 外链访问地址
     */
    @TableField(value = "`host`")
    @ApiModelProperty(value = "外链访问地址")
    private String host;

    /**
     * API访问地址
     */
    @TableField(value = "endpoint")
    @ApiModelProperty(value = "API访问地址")
    private String endpoint;

    /**
     * 账号或者用户识别码
     */
    @TableField(value = "access_key")
    @ApiModelProperty(value = "账号或者用户识别码")
    private String accessKey;

    /**
     * 密钥
     */
    @TableField(value = "secret_key")
    @ApiModelProperty(value = "密钥")
    private String secretKey;

    /**
     * 存储桶名称
     */
    @TableField(value = "bucket_name")
    @ApiModelProperty(value = "存储桶名称")
    private String bucketName;

    @ApiModelProperty(value = "是否强制使用路径模式")
    @TableField(value = "forced_path_mode")
    private Integer forcedPathMode;

    /**
     * icon的url链接
     */
    @TableField(value = "icon")
    @ApiModelProperty(value = "icon的url链接")
    private String icon;

    private static final long serialVersionUID = 1L;
}